package abhiWeb.com.abhi.presentation.video.action;

import java.io.PrintWriter;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.actions.DispatchAction;
import org.omg.CORBA.SystemException;

import abhiWeb.com.abhi.presentation.common.AbhiForwardConstants;
import abhiWeb.com.abhi.presentation.header.form.HeaderForm;
import abhiWeb.com.abhi.presentation.video.form.VideoForm;
import abhiWeb.com.abhi.service.video.service.VideoService;
import abhiWeb.com.abhi.transfer.video.VideoDisplayDO;
import org.apache.log4j.Logger;
import org.apache.log4j.xml.DOMConfigurator;

public class VideoAction extends DispatchAction 
{
	
	
static final Logger logger = Logger.getLogger(VideoAction.class);
	
	
	public ActionForward fillUniversities(ActionMapping actionMapping,
			ActionForm actionForm, HttpServletRequest request,
			HttpServletResponse response) throws Exception{
		
		ActionForward actionForward = null;
		try{
			VideoForm videoForm = (VideoForm) actionForm;
			actionForward = actionMapping.findForward(AbhiForwardConstants.FORWARD_VIDEO_TUTORIALS);
			System.out.println("fill universities method");
			VideoService videoService = new VideoService();
			VideoDisplayDO vdo=videoService.testing();
			System.out.println("ID is :" + vdo.getId());
			logger.debug("ID is :" + vdo.getId());
			logger.info("Sample info message");
			logger.warn("Sample warn message");
			logger.error("Sample error message");
			logger.fatal("Sample fatal message");
		}
		catch(SystemException se)
		{
			log.error(se.getMessage());
			se.printStackTrace();
		}
		return actionForward;
	}

	
	
}
